package nix.listener;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;

public class BListener implements ServletContextAttributeListener {

	public void attributeAdded(ServletContextAttributeEvent event) {
		System.out.println("向application中添加了名为：" + event.getName() + "，值为："
				+ event.getValue() + "的属性！");
	}

	public void attributeReplaced(ServletContextAttributeEvent event) {
		System.out.println("将application中名为：" + event.getName() + "的属性，值："
				+ event.getValue() + "，修改为："
				+ event.getServletContext().getAttribute(event.getName()));
	}

	public void attributeRemoved(ServletContextAttributeEvent event) {
		System.out.println("将application中名为：" + event.getName() + "，值为："
				+ event.getValue() + "的属性，移除！");
	}

}
